'****************************************************************************'
'                                                                            '
' Copyright (C) 2010 Muhammad alaa                                           '
'                                                                            '
' This program is free software; you can redistribute it and/or modify       '
' it under the terms of the GNU General Public License as published by       '
' the Free Software Foundation; either version 2 of the License, or          '
' (at your option) any later version.                                        '
'                                                                            '
' This program is distributed in the hope that it will be useful,            '
' but WITHOUT ANY WARRANTY; without even the implied warranty of             '
' MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the              '
' GNU General Public License for more details.                               '
'                                                                            '
' You should have received a copy of the GNU General Public License along    '
' with this program; if not, write to the Free Software Foundation, Inc.,    '
' 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.                '
'                                                                            '
'****************************************************************************'

Namespace OLE

    <ComImport()> _
    <InterfaceType(ComInterfaceType.InterfaceIsIUnknown)> _
    <Guid(IID.OLE.IOleInPlaceSiteWindowless)> _
    Public Interface IOleInPlaceSiteWindowless
        <PreserveSig()> Function GetWindow(<Out()> ByRef hwnd As IntPtr) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function ContextSensitiveHelp(<MarshalAs(UnmanagedType.Bool)> ByVal fEnterMode As Boolean) As <MarshalAs(UnmanagedType.Error)> Integer

        <PreserveSig()> Function CanInPlaceActivate() As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function OnInPlaceActivate() As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function OnUIActivate() As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function GetWindowContext(<Out()> ByRef ppFrame As IOleInPlaceFrame, <Out()> ByRef ppDoc As IOleInPlaceUIWindow, <Out()> ByRef lprcPosRect As Rect, <Out()> ByRef lprcClipRect As Rect, ByRef lpFrameInfo As OleInPlaceFrameInfo) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function Scroll(ByVal scrollExtant As Size) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function OnUIDeactivate(<MarshalAs(UnmanagedType.Bool)> ByVal fUndoable As Boolean) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function OnInPlaceDeactivate() As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function DiscardUndoState() As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function DeactivateAndUndo() As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function OnPosRectChange(ByRef lprcPosRect As Rect) As <MarshalAs(UnmanagedType.Error)> Integer

        <PreserveSig()> Function OnInPlaceActivateEx(<Out(), MarshalAs(UnmanagedType.Bool)> ByRef pfNoRedraw As Boolean, ByVal dwFlags As ActivateFlags) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function OnInPlaceDeactivateEx(<MarshalAs(UnmanagedType.Bool)> ByVal fNoRedraw As Boolean) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function RequestUIActivate() As <MarshalAs(UnmanagedType.Error)> Integer

        <PreserveSig()> Function CanWindowlessActivate() As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function GetCapture() As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function SetCapture(<MarshalAs(UnmanagedType.Bool)> ByVal fCapture As Boolean) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function GetFocus() As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function SetFocus(<MarshalAs(UnmanagedType.Bool)> ByVal fFocus As Boolean) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function GetDC(ByRef pRect As Rect, ByVal grfFlags As OleDCFlags, <Out()> ByRef phDC As IntPtr) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function ReleaseDC(ByVal hDC As IntPtr) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function InvalidateRect(ByRef pRect As Rect, <MarshalAs(UnmanagedType.Bool)> ByVal fErase As Integer) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function InvalidateRgn(ByVal hRGN As IntPtr, <MarshalAs(UnmanagedType.Bool)> ByVal fErase As Boolean) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function ScrollRect(ByVal dx As Integer, ByVal dy As Integer, ByRef pRectScroll As Rect, ByRef pRectClip As Rect) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function AdjustRect(ByRef prc As Rect) As <MarshalAs(UnmanagedType.Error)> Integer
        <PreserveSig()> Function OnDefWindowMessage(ByVal MSG As UInteger, ByVal wParam As IntPtr, ByVal lParam As IntPtr, <Out()> ByRef plResult As IntPtr) As <MarshalAs(UnmanagedType.Error)> Integer
    End Interface

End Namespace
